import request from '@/utils/request'

// 获取终端管理列表
export function listTerminal(query) {
  return request({
    url: '/ord/terminal/device/list',
    method: 'get',
    params: query
  })
}
// 保存终端数据
export function saveTerminal(data) {
  return request({
    url: '/ord/terminal/device/save',
    method: 'post',
    data
  })
}
// 续费终端
export function renewTerminal(data) {
  return request({
    url: '/ord/terminal/device/renewal',
    method: 'post',
    data
  })
}
//删除终端数据
export function delTerminal(ids) {
  return request({
    url: '/ord/terminal/device/delete/' + ids,
    method: 'post'
  })
}
//通过id获取终端数据详情
export function getTerminal(id) {
  return request({
    url: '/ord/terminal/device/get/' + id,
    method: 'get'
  })
}
// 获取统计列表
export function statisticsTerminal(query) {
  return request({
    url: '/ord/terminal/device/statistics',
    method: 'get',
    params: query
  })
}
// 数据导入
export function importTerminal(data) {
  return request({
    url: '/ord/terminal/device/import',
    method: 'post',
    data
  })
}
// 获取访问模板
export function getQuestion() {
  return request({
    url: '/ord/question/template/list',
    method: 'get'
  })
}
// 保存终端访问记录
export function saveTerminalAccess(data) {
  return request({
    url: '/ord/terminal/follow/save',
    method: 'post',
    data
  })
}
// 获取终端访问列表
export function listAccess(query) {
  return request({
    url: '/ord/terminal/follow/list',
    method: 'get',
    params: query
  })
}
